<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
  <style>
    /* 
      transform: perspective(1000px);
        我们可以单独的给每个元素设置单独的视距。相当于直接给对应元素添加一个视距，得到自己独有的样式
    
     */
    .box {
      transform-style: preserve-3d;
      perspective: 1000px;
      width: 500px;
      height: 200px;
      border: 1px solid;
      margin: 0 auto;

    }
    i {
      /* transform: perspective(1000px); */
      display: block;
      float: left;
      width: 100px;
      height: 100px;
      margin-top: 50px;
      background: #000;
      transition: all 3s;
    }
    div:hover i {
      /* transform: translateZ(100px); */
      transform: rotateY(90deg);
    }
  
  </style>
</head>
<body>
  <div class="box">
    <i></i>
    <i></i>
    <i></i>
    <i></i>
    <i></i>
  </div>
</body>
</html>